﻿<Window x:Class="Samba.Presentation.Common.Interaction.ValueChooserForm" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
     xmlns:uic="clr-namespace:UIControls;assembly=UIControls" Title="ValueChooserForm"
     Width="444" WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow" PreviewKeyDown="Window_PreviewKeyDown"
     mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     Closing="Window_Closing">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Label Name="DescriptionLabel" Grid.ColumnSpan="3" />
        <Label Grid.Row="1" Grid.Column="0" Name="ValuesLabel">
            <LocText ResourceIdentifierKey="List" Suffix=":"/>
        </Label>
        <ListBox Margin="3" Grid.Row="2" Grid.Column="0" Name="ValuesListBox" DisplayMemberPath="UserString"
             MouseDoubleClick="ValuesListBox_MouseDoubleClick" SelectionMode="Extended">
            <ListBox.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="{LocText DisplayAllValues}"
                         Click="MenuItem_Click">
                    </MenuItem>
                </ContextMenu>
            </ListBox.ContextMenu>
        </ListBox>
        <uic:SearchTextBox Grid.Row="3" Margin="3" Name="SearchTextBox" Search="SearchTextBox_Search"
             KeyDown="SearchTextBox_KeyDown">
            <uic:SearchTextBox.LabelText>
                <LocText ResourceIdentifierKey="Search"/>
            </uic:SearchTextBox.LabelText>
        </uic:SearchTextBox>
        <Label Grid.Row="1" Grid.Column="2" Name="SelectedValuesLabel">
            <LocText ResourceIdentifierKey="Selected"/>
        </Label>
        <ListBox Margin="3" Grid.Row="2" Grid.RowSpan="2" Grid.Column="2" Name="SelectedValuesListBox"
             DisplayMemberPath="UserString" dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
             MouseDoubleClick="SelectedValuesListBox_MouseDoubleClick" SelectionMode="Extended" />
        <StackPanel Grid.Column="1" Grid.Row="2">
            <Button Content="&gt;&gt;" Margin="3" Click="Button_Click_2" />
            <Button Content="&lt;&lt;" Margin="3" Click="Button_Click_3" />
        </StackPanel>
        <StackPanel Grid.Row="4" Grid.ColumnSpan="3" Orientation="Horizontal" HorizontalAlignment="Right"
             Margin="3">
            <Button Margin="3" Width="70" Click="Button_Click">
                <LocText ResourceIdentifierKey="OK"/>
            </Button>
            <Button Margin="3" Width="70" Click="Button_Click_1">
                <LocText ResourceIdentifierKey="Cancel"/>
            </Button>
        </StackPanel>
    </Grid>
</Window>